Load packages
library(tidyverse)
library(labelled)
library(kableExtra)
library(plotly)
theme_set(theme_minimal(base_size = 12))library(tidyverse)
library(labelled)
library(kableExtra)
library(plotly)
theme_set(theme_minimal(base_size = 12))source("r/derive_full_datasets.r")
dat <- read_all_no_daily()dat %>%
count(ENR_rec, EL_OutcomeReason) %>%
group_by(ENR_rec) %>%
arrange(-n, .by_group = TRUE) %>%
ungroup()# A tibble: 16 × 3
ENR_rec EL_OutcomeReason n
<dbl> <chr> <int>
1 0 Did not consent 175
2 0 Not in the best interests 163
3 0 No eligible domains 61
4 0 Not committed to active treatment 58
5 0 First positive test - over 14 days ago 41
6 0 Does the patient have at least one symptom or sign attributabl… 32
7 0 First symptoms - over 14 days ago 30
8 0 Has SARS-CoV-2 been confirmed by nucleic acid testing - answer… 28
9 0 Receiving acute intensive respiratory support 18
10 0 Did not consent to any domains 6
11 0 Expired Platform Pending 6
12 0 Previously participated in the trial 4
13 0 Pregnant patients cannot be enrolled at this hospital 1
14 1 <NA> 1599
15 1 Saved for later 1
16 1 Waiting for: Pregnancy test 1
For reference, the exclusion criteria for the anti-coagulation domain follows (derived variable EL_inelg_c):
EL_DualAntiplateletTherapy)EL_TherapeuticAnticoag)EL_ContraHeparinReact)EL_BloodPlateletTestAs_x10_9_L)EL_IntracranialHaemorrhage)EL_eGFR)EL_BleedingConditionThrombo)dat %>%
filter(ENR_rec == 1) %>%
count(
EL_inelg_c,
CAssignment,
EL_Con_DomainC
)# A tibble: 7 × 4
EL_inelg_c CAssignment EL_Con_DomainC n
<int+lbl> <chr> <chr> <int>
1 0 C0 No 12
2 0 C1 Yes 620
3 0 C2 Yes 620
4 0 C3 Yes 285
5 0 C4 Yes 50
6 1 C0 <NA> 2
7 NA C0 <NA> 12
The one participant with blood platelet less than 50 was correctly enrolled under protocol version 3.0 (blood platelet was > 30).
dat %>%
filter(
ENR_rec == 1,
EL_Con_DomainC == "Yes",
!is.na(EL_Con_DomainC)
) %>%
summarise(
`Receiving therapeutic anticoag` =
sum(EL_TherapeuticAnticoag == "Yes"),
`Dualy antiplatelet therapy` =
sum(EL_DualAntiplateletTherapy == "Yes"),
`Blood platelet < 30` =
sum(EL_BloodPlateletTestAs_x10_9_L < 30),
`Blood platelet < 50` =
sum(EL_BloodPlateletTestAs_x10_9_L < 50),
`Contraindication heparin` =
sum(EL_ContraHeparinReact == "Yes"),
`Intracranial haemorrahge` =
sum(EL_IntracranialHaemorrhage == "Yes"),
`Bleeding condition` =
sum(EL_BleedingConditionThrombo == "Yes"),
`eGFR < 15` =
sum(EL_eGFR < 15)
) %>%
gather()# A tibble: 8 × 2
key value
<chr> <int>
1 Receiving therapeutic anticoag 0
2 Dualy antiplatelet therapy 0
3 Blood platelet < 30 0
4 Blood platelet < 50 1
5 Contraindication heparin 0
6 Intracranial haemorrahge 0
7 Bleeding condition 0
8 eGFR < 15 0
Only the standard dose plus aspirin intervention had intervention specific exclusion criteria (appendix version 3.0). For reference, these criteria were (derived variable EL_inelg_c3):
EL_ReceivingAntiplatelet)EL_HyperAspirin)After this intervention had been dropped from the platform, the eligibility criteria ceased to be assessed, so this information is not available for participants enrolled after the intervention had been removed.
dat %>%
filter(ENR_rec == 1) %>%
dplyr::count(
EL_inelg_c3,
EL_ReceivingAntiplatelet,
EL_HyperAspirin,
CAssignment,
EL_Con_DomainC
)# A tibble: 13 × 6
EL_inelg_c3 EL_ReceivingAnt… EL_HyperAspirin CAssignment EL_Con_DomainC n
<int+lbl> <chr> <chr> <chr> <chr> <int>
1 0 No No C0 No 3
2 0 No No C1 Yes 357
3 0 No No C2 Yes 347
4 0 No No C3 Yes 285
5 1 Yes No C0 No 1
6 1 Yes No C1 Yes 20
7 1 Yes No C2 Yes 18
8 1 Yes Yes C2 Yes 1
9 NA <NA> <NA> C0 No 8
10 NA <NA> <NA> C0 <NA> 14
11 NA <NA> <NA> C1 Yes 243
12 NA <NA> <NA> C2 Yes 254
13 NA <NA> <NA> C4 Yes 50
dat %>%
filter(ENR_rec == 1) %>%
ggplot(., aes(AgeAtEntry)) +
geom_histogram(
breaks = c(18, seq(20, 100, 5)),
colour = "white",
closed="left") +
labs(
x = "Age at randomisation (5-year bins, 30 to 34, 35 to 39, etc.)",
y = "Count") +
scale_x_continuous(breaks = seq(20, 95, 5))p <- dat %>%
filter(ENR_rec == 1) %>%
ggplot(., aes(AgeAtEntry)) +
facet_wrap( ~ CAssignment, scales = "free_y", ncol = 5) +
geom_histogram(
breaks = c(18, seq(20, 100, 5)),
colour = "white",
closed="left") +
labs(
x = "Age at randomisation (5-year bins, 30 to 34, 35 to 39, etc.)",
y = "Count") +
scale_x_continuous(breaks = seq(20, 95, 5))
ggplotly(p, width = 1700, height = 400)Figure 2: Distribution of age by anti-coagulation intervention